// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

// 引入store
import store from './store' 

// 引入element ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

// 工具包
import commons from './utils/commons'
Vue.prototype.$commons = commons

// api挂载
import api from './api'
Vue.prototype.$api = api

// // rsa加密
import Rsa from "@/utils/rsa.js"
Vue.prototype.Rsa = Rsa

Vue.config.productionTip = false

// 键入效果
import VueTyperPlugin from 'vue-typer'
Vue.use(VueTyperPlugin)

// 影片背景
import VideoBg from 'vue-videobg'
Vue.component('video-bg', VideoBg)

// 视频播放器
import VueCoreVideoPlayer from 'vue-core-video-player'
Vue.use(VueCoreVideoPlayer)

import * as Echarts from 'echarts'
Vue.prototype.$echarts = Echarts

// 富文本回显
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)

// 宽度自适应
import Plugin from 'v-fit-columns';
Vue.use(Plugin);
import AFTableColumn from 'af-table-column'
Vue.use(AFTableColumn)


// 轮播
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
Vue.use(VueAwesomeSwiper)

// 网络
import axios from 'axios'
Vue.prototype.$axios = axios 

// 高亮
import VueHighlightJS from 'vue-highlightjs'
import 'highlight.js/styles/atom-one-dark.css'
Vue.use(VueHighlightJS)

import hljs from 'highlight.js';

Vue.directive('hljs', el => {
  document.querySelectorAll('pre code').forEach((block) => {
    hljs.highlightBlock(block);
    hljs.configure({useBR: true});
  });
});

// import VueCodeHighlight from 'vue-code-highlight';
// import 'vue-code-highlight/themes/window.css'
// Vue.use(VueCodeHighlight)

// //引入 Froala Editor js file.
// require('froala-editor/js/froala_editor.pkgd.min')
// //引入中文语言包
// require('froala-editor/js/languages/zh_cn')
// //引入 Froala Editor css files.
// require('froala-editor/css/froala_editor.pkgd.min.css')
// require('font-awesome/css/font-awesome.css')
// require('froala-editor/css/froala_style.min.css')
// // Import and use Vue Froala lib.
// import jQuery from 'jquery'
// import VueFroala from 'vue-froala-wysiwyg'
// window.$ = jQuery
// window.jQuery = jQuery
// Vue.use(VueFroala)


// import VueCodeMirror from 'vue-codemirror'
// import 'codemirror/lib/codemirror.css'
// Vue.use(VueCodeMirror)


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store, //挂载store，this将自动生成$store属性
  components: { App },
  template: '<App/>'
})
